A data storage device, such as disk or portable disk, includes a non-volatile memory for storing data. The non-volatile memory includes a plurality of pages. In order to improve the reading speed of the data storage device, page alignment is executed on the storage space in the data storage device so as to make each record of data with a size identical to the storage capacity of a page to be written into a completely empty page. Namely, each record of data is written into one page, thereby avoiding the record of data being written across more than one page. However, in conventional page alignment, some pages are configured for not storing data and the remaining storage capacity are designed as empty pages for storing data. However, these pages configured for not storing data may be determined as unallocated space by the operating system and the pages are configured for not storing data may occupy too much storage space; therefore, the user may loss some storage space. In addition, when the data storage device is re-formatted and the file system parameters change accordingly, the effect of page alignment may be moot thus leading to a poor system performance.